From: Ian Campbell Date: Wed, 25 Oct 2006 12:58:30 +0000 (+0100) Subject: [LINUX] PV-on-HVM: Remove the attr parameter from device attribute X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15584^2~24 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=3ac6239a86871d78ff14364f60d15ed30c1df1ff;p=xen.git [LINUX] PV-on-HVM: Remove the attr parameter from device attribute show methods on kernels prior to 2.6.13. The parameter was not present before that. Signed-off-by: Ian Campbell Signed-off-by: K. Y. Srinivasan Signed-off-by: Tsunehisa Doi --- diff --git a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c index 4baecbe17e..fa3a40165e 100644 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c @@ -453,14 +453,20 @@ char *kasprintf(const char *fmt, ...) } static ssize_t xendev_show_nodename(struct device *dev, - struct device_attribute *attr, char *buf) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) + struct device_attribute *attr, +#endif + char *buf) { return sprintf(buf, "%s\n", to_xenbus_device(dev)->nodename); } DEVICE_ATTR(nodename, S_IRUSR | S_IRGRP | S_IROTH, xendev_show_nodename, NULL); static ssize_t xendev_show_devtype(struct device *dev, - struct device_attribute *attr, char *buf) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) + struct device_attribute *attr, +#endif + char *buf) { return sprintf(buf, "%s\n", to_xenbus_device(dev)->devicetype); }